package com.yh.patterns.adapter.twoWay_Adapter;

/**
 * @Auther:云尚学Java
 */
public class Client {
    public static void main(String[] args) {
        Adapter adapter=new Adapter();

        //让狗学猫抓老鼠
        CatTarget catTarget=new CatTargetImpl();
        DogAdaptee dogAdaptee=new DogAdapteeImpl();
        dogAdaptee.cry();
        adapter.setCatTarget(catTarget);
        adapter.cry();

        System.out.println("======");

        //让猫学狗叫
        catTarget.catchMouse();
        adapter.setDogAdaptee(dogAdaptee);
        adapter.catchMouse();
    }
}
